<div class="col-sm-12 nopadding-left nopadding-right" style="background:#fff;">
  <!-- BOX -->
  <div class="box nopadding-left nopadding-right">
    <div class="box-body nopadding-left nopadding-right" >
      <div id="" class="dataTables_wrapper form-inline col-sm-4 nopadding-right" style="padding-left:20px;" role="grid">
        <div class="row" style="margin-bottom:5px;">
            <div class="user-add-btn col-sm-12 nopadding-right">
              {{#ui/mix-button class="user-btn pull-left" iconClass="fa-plus"  text='新增培训类型'  clickAction="addType" addType="addType" }}
              {{/ui/mix-button}}
            </div>
        </div>
        {{#if typeList}}
        {{#each typeList as |type|}}
        <div class="customer-drug-list col-sm-12 pointer {{if type.hasSelected 'drugcolor' ''}} " style="font-size:14px;padding-left:4px;"
         {{action "chooseType" type on="click"}} {{action 'hoverDoc' type on="mouseEnter" bubbles=false}}
         {{action 'leaveDoc' type on="mouseLeave" bubbles=false}}>
           {{#if type.edited}}
              {{input class="form-control " value=type.name type="text" focusOut=(action "saveType" type) bubbles=false}}
           {{else}}
            {{type.name}}
           {{/if}}
          {{#if type.hover}}
          {{#unless type.edited}}
            <div class="pull-right">
              <i class="fa fa-edit" {{action 'edit' type on="click" bubbles=false}}>
                {{bs-tooltip title="编辑" class="light-tooltip"}}
              </i>
              <i class="fa fa-trash-o" {{action 'delById' type 'type' on="click" bubbles=false}}>
                {{bs-tooltip title="删除" class="light-tooltip"}}
              </i>
            </div>
          {{/unless}}
          {{/if}}
        </div>
        {{/each}}
        <div class="col-sm-12" style="height:16px;"></div>
        {{else}}
        <div class="col-sm-12 center nopadding-left" style="font-size:24px;">暂无数据</div>
        {{/if}}
      </div>
      {{#if curDocType}}

        <div id="datatable2_wrapper" class="dataTables_wrapper form-inline col-sm-8 nopadding-left  curcustomer-drug-list"  role="grid" >
            <div class="col-sm-2 pull-left  nopadding-left nopadding-right" style="font-weight: bold;color:#8d8d8d;">
              培训资料
            </div>
            <div class="col-sm-2 pull-right  nopadding-left nopadding-right user-add-btn">
              {{#ui/mix-button class="user-btn pull-left" iconClass="fa-plus"  text='新增资料'  clickAction="add" add="add"}}
              {{/ui/mix-button}}
            </div>
            <div class="col-sm-12 nopadding-left nopadding-right" style="margin-top:4px;">
              <div class="col-md-12 box-container ui-sortable nopadding-left nopadding-right">

								<!-- BOX SOLID-->
                  {{#each docList as |doc|}}
                    <div class="panel panel-default full-width col-sm-12 nopadding-left nopadding-right" style="margin-bottom:0;border:none;">
                      <div class="panel-heading">
                        <div class="panel-title pointer"  style="font-size:13px;"
                          {{action 'hoverDoc' doc on="mouseEnter" bubbles=false}}
                      		{{action 'leaveDoc' doc on="mouseLeave" bubbles=false}}>

                          <span class="full-width" style="display:inline-block">
                            {{#if doc.chooseName}}
                              {{input class="form-control " value=doc.name type="text" placeholder="必填" focusOut=(action "saveName" doc) bubbles=false}}
                            {{else}}
                              <span {{action 'chooseDoc' doc on='click'}} class="full-width" style="display:inline-block">
                              <i class=" {{if doc.hasChoosed 'fa-chevron-up' 'fa-chevron-down'}}"></i>
                              <span>{{doc.name}}</span>
                              {{#if doc.hover}}
                                <i class="fa fa-trash-o pull-right" {{action 'delById' doc on='click' bubbles=false}}>{{bs-tooltip title="删除" class="light-tooltip"}}</i>
                                <i class="fa fa-edit pull-right" {{action 'hoverName' doc on="click"  bubbles=false}}>{{bs-tooltip title="编辑" class="light-tooltip"}}</i>
                              {{/if}}
                            </span>
                            {{/if}}
                          </span>

                        </div>
                      </div>
                      {{#if doc.hasChoosed}}
                      <div id="collapseOne" class="panel-collapse collapse in pointer" style="font-size:13px;" {{action 'editDoc' doc on="click" bubbles=false}}>
                        {{#if doc.editModel}}
                        {{#callbusi/kind-editor value=curData.remark}}
                        {{/callbusi/kind-editor}}
                        {{else}}
                        <div class="panel-body " style="overflow:auto" id={{doc.id}}>
                  			</div>
                        {{/if}}
                  		</div>
                      {{/if}}
                    </div>
                  {{/each}}
								<!-- /BOX SOLID -->
							</div>
            </div>
        </div>
      {{/if}}
    </div>

  </div>
  <!-- /BOX -->

</div>

{{#if addModel}}
	{{#bs-modal body=false footer=false header=false closeAction='invitation'}}
		{{#bs-modal-header}}
			<h3 class="modal-title">{{addName}}</h3>
		{{/bs-modal-header}}
		{{#bs-modal-body}}
			<div style="min-height:500px;">
				<div class="col-xs-12 nopadding-left">
					<div class="form-input-group">
						<span class="input-group-addon">名称：</span>
            {{input class="form-control " value=curData.name type="text" placeholder="必填"}}
					</div>
				</div>
        <div class="col-xs-12 nopadding-left training-materials">
          <div class="form-input-group">
            <span class="input-group-addon">内容：</span>
            {{textarea type="text" class="full-width inline-block form-input-group label-normal form-control" value=curData.remark placeholder='内容'}}
          </div>
        </div>
        <div class="col-xs-12 nopadding-left training-materials">
          <div class="form-input-group">
            <span class="input-group-addon">附件列表：</span>

            {{#ui/mix-button id="uploadFile" class="user-btn pull-right" iconClass="fa-plus" text='上传附件'}}
            {{/ui/mix-button}}
            {{#pl-uploader extensions="docx doc xlsx xls" accepts=['*.docx','*.doc','*.xlsx','*.xls'] for="uploadFile"
            onfileadd="uploadFile" as |queue features|}}
            {{/pl-uploader}}
          </div>
        </div>
        <div class="col-xs-12">
          {{#each curData.file as |file|}}
            {{#if (eq file.delStatus 0)}}
            <div>
              <span>{{file.name}}</span><a class="pointer" href={{file.path}}>下载</a>&nbsp;&nbsp;<a class="pointer" {{action 'delFile' file on="click"}}>删除</a>
            </div>
            {{/if}}
          {{/each}}
        </div>

      </div>
		{{/bs-modal-body}}
    {{#bs-modal-footer class="user-add-btn"}}
      {{#ui/mix-button class="user-btn edit-btn" iconClass="fa fa-save"  text='确定' clickAction="save" save="save"}}
      {{/ui/mix-button}}
      {{#ui/mix-button class="user-btn times-btn" iconClass="fa fa-undo"  text='取消'  clickAction="invitation" invitation="invitation"}}
      {{/ui/mix-button}}
		{{/bs-modal-footer}}
	{{/bs-modal}}
{{/if}}

{{#if addNewModel}}
  {{#bs-modal body=false footer=false header=false closeAction='invitation'}}
    {{#bs-modal-header}}
      <h3 class="modal-title">{{addName}}</h3>
    {{/bs-modal-header}}
    {{#bs-modal-body}}
      <div>
        <div class="col-xs-12 nopadding-left">
          <div class="form-input-group">
            <span class="input-group-addon">名称：</span>
            {{input class="form-control " value=newData.name type="text" placeholder="必填"}}
          </div>
        </div>
      </div>
    {{/bs-modal-body}}
    {{#bs-modal-footer class="user-add-btn"}}
      {{#ui/mix-button class="user-btn edit-btn" iconClass="fa fa-save"  text='确定' clickAction="saveNewData" saveNewData="saveNewData"}}
      {{/ui/mix-button}}
      {{#ui/mix-button class="user-btn times-btn" iconClass="fa fa-undo"  text='取消'  clickAction="invitation" invitation="invitation"}}
      {{/ui/mix-button}}
		{{/bs-modal-footer}}
  {{/bs-modal}}
{{/if}}

{{#if addNewTypeModel}}
  {{#bs-modal body=false footer=false header=false closeAction='invitation'}}
    {{#bs-modal-header}}
      <h3 class="modal-title">{{addTypeName}}</h3>
    {{/bs-modal-header}}
    {{#bs-modal-body}}
      <div>
        <div class="col-xs-12 nopadding-left">
          <div class="form-input-group">
            <span class="input-group-addon">名称：</span>
            {{input class="form-control " value=newType.name type="text" placeholder="必填"}}
          </div>
        </div>
      </div>
    {{/bs-modal-body}}
    {{#bs-modal-footer class="user-add-btn"}}
      {{#ui/mix-button class="user-btn edit-btn" iconClass="fa fa-save"  text='确定' clickAction="saveNewType" saveNewType="saveNewType"}}
      {{/ui/mix-button}}
      {{#ui/mix-button class="user-btn times-btn" iconClass="fa fa-undo"  text='取消'  clickAction="invitation" invitation="invitation"}}
      {{/ui/mix-button}}
		{{/bs-modal-footer}}
  {{/bs-modal}}
{{/if}}

{{#if fileUpLoad}}
  {{#bs-modal body=false footer=false header=false closeAction='exit'}}
    {{#bs-modal-body}}
      <div>
        <div class="col-xs-12 nopadding-left">
          <div class="form-input-group col-sm-6">
            <span class="input-group-addon">描述：</span>
            {{input class="form-control " value=newFile.name type="text" placeholder="必填"}}(文件大小小于10M)
          </div>
          <div class="col-sm-6" id="up-load-button">
            {{#if upDone}}
            <div class="col-sm-6 form-input-group" >
              <span class="input-group-addon" style="color:green;"><i class="fa fa-check"></i>上传成功</span>
            </div>
            {{/if}}
            {{#if upFalse}}
            <div class="col-sm-6 form-input-group" >
              <span class="input-group-addon" style="color:red;"><i class="fa fa-times"></i>上传失败</span>
            </div>
            {{/if}}
          </div>
        </div>
      </div>
    {{/bs-modal-body}}
    {{#bs-modal-footer class="user-add-btn"}}
      {{#ui/mix-button class="user-btn edit-btn" iconClass="fa fa-save"  text='确定' clickAction="saveNewFile" saveNewFile="saveNewFile"}}
      {{/ui/mix-button}}
      {{#ui/mix-button class="user-btn times-btn" iconClass="fa fa-undo"  text='取消'  clickAction="exit" exit="exit"}}
      {{/ui/mix-button}}
		{{/bs-modal-footer}}
  {{/bs-modal}}
{{/if}}
